package com.guomao;

import com.guomao.generics.MyGenericA;
import com.guomao.generics.MyGenericD;

public class GenericsDemoA {


    public static void main(String[] args) {


        MyGenericA<String> a = new MyGenericA<>();

        a.setT("hello");

        MyGenericA<Integer> b = new MyGenericA<>();

        b.setT(123);

        String t1 = a.getT();
        Integer t2 = b.getT();

//        MyGenericB c = new MyGenericB();


        MyGenericD<Character> d = new MyGenericD<>();

        Character[] ch = {'a', 'b', 'c'};
        d.each(ch);

        MyGenericD<Integer> d2 = new MyGenericD<>();

        Integer[] ch2 = {1, 2, 3};
        d.each(ch2);
    }
}
